<?php include_once("site/header.php"); ?>

<div class="container_12">
    <div class="grid_12">
        <h6 class="h6-left">Galería:</h6>
        <div class="pad">
            <ul id="mycarousel-1" class="jcarousel-skin-tango-2">
                <?php
                if ($handle = opendir(ROOT . "/includes/img/galeria")) {
                    while (false !== ($entry = readdir($handle))) {
                        $ext = strtolower(pathinfo($entry, PATHINFO_EXTENSION));
                        $extensiones = array("jpg", "jpeg", "png", "gif");
                        if (in_array($ext, $extensiones)) {
                            ?>
                            <li>
                                <figure>
                                    <a class="fancybox" rel="gallery1" title="" href="<?= IMG_PATH ?>galeria/<?= $entry ?>">
                                        <img src="<?= IMG_PATH ?>galeria/<?= $entry ?>" alt="" height="200">
                                    </a>
                                </figure>
                                <div class="clear"></div>
                            </li>
                            <?php
                        }
                    }
                    closedir($handle);
                }
                ?>
            </ul>
        </div>
    </div>
    <div class="clear"></div>
</div>

<?php include_once("site/footer.php"); ?>